<style >
    .addtr{
        color: #3bff5a;
    }
    .deltr{
        color:red;
    }
</style>
<article class="cl pd-20" xmlns:th="http://www.thymeleaf.org">
    <form  class="form form-horizontal" id="form-add">
        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>订单号：</label>
            <div class="formControls col-xs-7 ">
                <input type="text" class="input-text" th:value="${orderid}" placeholder=""  name="orderid"  readonly="true"/>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>下单方式：</label>
            <div class="formControls col-xs-7 ">
                <span class="select-box">
                <select name="type" class="select" id="type">
                    <option value="1">店内购买</option>
                    <option value="2">微信下单</option>
                </select>
                </span>
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>支付方式：</label>
            <div class="formControls col-xs-7 ">
               <span class="select-box">
                <select name="payway" class="select" id="payway">
                    <option value="1">现金支付</option>
                    <option value="2">微信支付</option>
                    <option value="3">支付宝支付</option>
                </select>
                </span>
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>订单商品：</label>
            <div class="formControls col-xs-7 ">
                <table class="table table-border table-bordered table-hover table-bg" >
                    <thead>
                    <tr class="text-c">
                        <th width="100">种类</th>
                        <th >名称</th>
                        <th width="15">数量</th>
                        <th width="35">操作</th>
                    </tr>
                    </thead>
                    <tbody id="detailtable">
                    <tr class="text-c temptr">
                        <td>
                            <span class="select-box">
                            <select name="cid" class="select" id="one"  onchange="loadGoods(this)" >
                                <option value="0">请选择</option>
                                <option th:each="c: ${categories}" th:value="${c.id}" th:text="${c.name}"></option>
                            </select>
                            </span>
                        </td>
                        <td>
                            <span class="select-box">
                            <select name="goodsname" onchange="inputfocus(this)" class="select goodsname"  >
                                <option value="0">请选择种类</option>
                            </select>
                            </span>
                        </td>
                        <td>
                            <input type="text" value="" totalmoney="0"  class="input-text" style="width:30px;" name="goodsnum" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" />
                        </td>
                        <td>
                            <i class="icon-plus addtr" onclick="addtr()"></i>
                        </td>
                    </tr>
                    </tbody>
                </table>

            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-3 " style="text-align: center;"><span class="c-red">*</span>总金额：</label>
            <div class="formControls col-xs-5 ">

                <input type="text" class="input-text"  placeholder="" id="totalmoney"  name="total"  readonly="true"/>

            </div>
            <div class="formControls col-xs-2 ">
                <button name="" onclick="cal_total()" class="btn btn-success" type="button">算总价</button>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-xs-offset-3">
                <input type="hidden" name="orderDetailJson" id="orderDetailJson"/>
                <input class="btn btn-primary radius" id="submit" type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;" />
            </div>
        </div>
    </form>
</article>


    <script type="text/javascript" th:src="@{/H-UI/lib/jquery.validation/1.14.0/jquery.validate.js}"></script>
    <script type="text/javascript" th:src="@{/H-UI/lib/jquery.validation/1.14.0/messages_zh.js}"></script>
    <script type="text/javascript" th:src="@{/scripts/order/add.js}"></script>

